#include <iostream>

#include "graph.h"
#include "mySolution.h"
#include "myTwoOpt.h"
#include "myTwoOptNext.h"
#include "edaBestImprSelect.h"
#include "edaHC.h"

int main(int argc, char **argv)
{
  if (argc != 2) {
    std::cerr << "Usage : ./myHCSearch [instance]" << std::endl;
    return 1;
  }

  srand(1000);

  Graph graph;

  graph.load(argv[1]);

  mySolution route(graph);

  std::cout << "[From] " << route << std::endl;

  myTwoOpt two_opt(graph);
  edaBestImprSelect moveSelect;
  myTwoOptNext two_opt_next(graph);

  edaHC hcSearch(&two_opt, &two_opt_next, &moveSelect);
  hcSearch.search(route);

  std::cout << "[To] " << route << std::endl;
  std::cout << "[To Fitness] " << route.fullEvaluate() << std::endl;

  return 0;
}
